<?php include('header.php'); ?>

<!-- additional javascript hear -->
<script type="text/javascript" src="<?=base_url();?>application/scripts/jquery-1.4.2.min.js"></script>

<!-- begine tipsy --> 
<link rel="stylesheet" href="<?=base_url();?>application/css/tipsy.css" type="text/css" />
<script type="text/javascript" src="<?=base_url();?>application/scripts/jquery.tipsy.js"></script>
<!-- end tipsy -->

<!-- begine boxy --> 
<link rel="stylesheet" href="<?=base_url();?>application/css/boxy.css" type="text/css" />
<script type="text/javascript" src="<?=base_url();?>application/scripts/jquery.boxy.js"></script>
<!-- end boxy -->

<style type="text/css">
<!--
#wrapper #one_wide .item table tr td a img {
	color: #F2F9FF;
}
-->
     
</style>


<script type='text/javascript'>
  $(function() {
	 $('.tipsy').tipsy({gravity: 'e'});
 });
</script>


</head>
<body>
<div id="wrapper">
<!-- menu -->
<?php include('menu.php'); ?>
<!-- end menu -->

<!-- navigator -->
<?php include('navigator.php'); ?>
<!-- nav end -->

 <div id="one_wide">
<?php
	if($this->session->flashdata('error'))
	{ 
		echo '<div class="error">' . $this->session->flashdata('error') . '</div>';
	}
	elseif($this->session->flashdata('success'))
	{
		echo '<div class="success">' . $this->session->flashdata('success') . '</div>';
	}
	
	echo validation_errors('<div class="error">', '</div>');
?>

<div class="item">
<img src="<?=base_url();?>application/images/contacts.gif" />
<h3>เพื่อนของฉัน</h3><hr />

<?php
if($friends == null)
{
	echo "<p>ยังไม่รู้จะตามใครใช่มั้ย?" . anchor('search', ' ค้นหาคนอื่นๆ') . "</p>";
}else{
	foreach($friends as $friendsId)
		{
			$friendsName = $this->usermodel->getName($friendsId);
			$friendsAvatar = $this->usermodel->getAvatar($friendsId);
?>
<div class="row" >
<a class="tipsy" href="<?=base_url();?>user/id/<?=$friendsId;?>" title="<?=$friendsName;?>">
<img width="42px" src="<?=$friendsAvatar;?>" alt="<?=$friendsName;?>" />
</a>
<input class="button" type="button" onclick='Boxy.confirm("คุณต้องการลบ <?=$friendsName;?> ออกจากรายชื่อเพื่อนของคุณ ใช่หรือไม่?", function() { alert("Confirmed!"); });' value="Unfollow" />
</div>

<?}}?>

</div>
</div>
      <script type='text/javascript'>
      
        $(function() {
          
          Boxy.DEFAULTS.title = 'Warning!';
          
        });
      </script>
<!-- footer -->
<?php include('footer.php');?>
<!-- footer end -->
</div>
</body>
</html>